from django.db import models

class Author(models.Model):
    username = models.CharField(max_length=10)
    password = models.CharField(max_length=20)

class Books(models.Model):
    name = models.CharField(max_length=20)
    title = models.CharField(max_length=20)
    # 内容
    content = models.CharField(max_length=30)
    cate = models.ForeignKey(Author,on_delete=models.CASCADE)


